package com.dartfar.mail.service;

import java.io.File;
import java.util.List;

import com.dartfar.base.service.BaseService;
import com.dartfar.mail.model.Attachment;
import com.dartfar.mail.model.Mail;
import com.dartfar.mail.model.MailState;
import com.dartfar.mail.model.SendState;


public interface MailService extends BaseService<Mail> {

	public static final Boolean UNREAD = true;

	public static final Boolean READ = false;
	
	public void sendMail(int[] receiveIds, Mail mail);

	public void sendMail(int sendId, int[] receiveIds, Mail mail);

	public void sendMail(int sendId, String[] receiveIds, Mail mail);

	public List<MailState> receiveMail(int userid);

	public void removeReceiveMail(int id);

	public List<MailState> getReceiveListByUserId(int userId);

	public List<MailState> getReceiveListByUserIdByLimit(int userId, int limit);

	public List<SendState> getSendListByUserId(int userId);

	public void removeSendMail(int id);

	public void clearReceive(int userid);

	public void clearSend(int userid);

	public SendState getSendMail(int id);

	public MailState showReceiveMail(int id);

	public Long getUnReadMailCount(int id);
	
	public void upload(Mail mail,File[] uploadFile,String[] caption,String[] uploadFilename);
	
	public Attachment getAttachment(int attachId);
	
	public File getAttachmentFile(Attachment att);
	
}
